Various animation and effect systems for time-based media editing and playback systems enable users to specify complex combinations of effects to be applied to media data, such as image and audio data. Media data may be computer generated or captured from live or recorded sources, and typically is stored in a data file on a computer. With some systems, depending on the complexity of an effect, the effect may need to be rendered i.e., the effect is applied to its inputs to produce an output that is stored, to play back the output of the effect in real time.
In general, in an editing and playback system using effects, improving the performance of the system during rendering is a common problem. Algorithms may be enhanced to increase their speed, or faster computer hardware may be used to improve performance. Rendered effects commonly are cached. However, a change in an effect during editing often causes the entire effect to be re-rendered.
Performance of rendering of effects on media data may be improved by analyzing properties defined for an effect to identify static and dynamic time segments within the effect. A static time segment in an effect is a time segment for which only one image is rendered. A dynamic time segment in an effect is a time segment for which each sample of media data in the time segment is rendered. An effect can contain any number of static and dynamic time segments. By identifying these time segments in an effect, processing and caching of the rendered effect are more finely grained. In particular, rendered time segments in an effect may be cached, such that a change in the effect in one time segment does not require re-rendering of other time segments. Thus, unnecessary rendering may be avoided, and invalidation of cached rendered media data and subsequent rerendering also may be reduced.
For example, in an animated effect, only one sample of media data may be rendered for a time segment in an effect if property animation and input material are both static in the time segment. If a key frame is inserted into a function curve of a property for an effect in such a way that the curve does not change, then any cached media data previously rendered for the effect need not be invalidated for the effect or for a time segment in the effect that contains this key frame. For a time segment in an effect in which properties are such that they do not change input media data, no rendering is needed. Such a time segment may be either a static or dynamic time segment, depending on the input to the effect.
Accordingly, in one aspect, a method and system for maintaining unique identifiers of cached rendered media data analyzes properties of an effect, which is applied to input media data to produce output media data, to identify any static time segments and any dynamic time segments in the effect. A unique identifier is assigned to each of the one or more time segments identified for use in caching rendered media data for the effect. The media data may be video, images, audio or other time-based media data.
In one embodiment, wherein the effect is an animation, any static time segments and any dynamic time segments may be identified by identifying where property curves and input material to the animation are static. In another embodiment, wherein the effect is a keyframed effect, any static time segments and any dynamic time segments may be identified by identifying if, after addition of a key frame, the property curve remains unchanged. In another embodiment, wherein the effect is a function that is applied to the input media data, any static time segments and any dynamic time segments may be identified by identifying conditions under which the function as applied to the input media data is an identity function.
In another embodiment, the time segment of the effect associated to each unique identifier is rendered and the rendered time segment of the effect is cached using the unique identifier. A cached rendered time segment of the effect may be retrieved using the unique identifier.
In another embodiment, the effect may be edited. Any cached rendered effect may be invalidated if a different unique identifier for the rendered effect is generated by the effect hierarchy after the editing is performed.
In another aspect, a computer program product, including a computer readable medium with instructions stored thereon, may be used by a computer to perform such a method for maintaining unique identifiers of cached rendered media data.
In another aspect, a system for maintaining unique identifiers of cached rendered media data includes a property analysis module that has an input for receiving information defining properties of an effect, which is applied to input media data to produce output media data, and an output for providing an indication identifying any static time segments and any dynamic time segments in the effect. A data descriptor generator has an input for receiving information defining an effect and an input for receiving the indication identifying the static time segments and the dynamic time segments in the effect, and has an output for providing a unique identifier to each of the one or more time segments identified for use in caching rendered media data for the effect.